@layout("/common/_container.html",{bg:"bg-white",js:["/assets/modular/order/order_edit.js"]}){
<form id="orderForm" lay-filter="orderForm" class="layui-form model-form layui-row">
    <div class="layui-col-md6">
        <input name="id" id="id" type="hidden"/>
        <input name="isAdmin" id="isAdmin" type="hidden"
               @if(shiro.isAdmin()){
                    value="true"
               @}else{
                    value="false"
               @}
               value="" />
        <div class="layui-form-item">
            <label class="layui-form-label">订单号<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="orderNo"  name="orderNo" placeholder="请输入订单号" type="text" class="layui-input"  disabled/>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">订单总金额<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="totalPrice" name="totalPrice" placeholder="请输入订单总金额" type="number" min="0" max="10000000" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">用户支付现金<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="payPrice" name="payPrice" placeholder="未支付" type="number"  min="0" max="10000000" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">用户支付积分<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="payScore" name="payScore" placeholder="未支付" type="text" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">积分抵扣金额<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="payScorePrice" name="payScorePrice" placeholder="请输入积分抵扣金额" type="text" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">优惠券抵扣金额<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="deductionPrice" name="deductionPrice"   type="text" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品原始总价格<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="originalTotalGoodsPrice" name="originalTotalGoodsPrice" placeholder="请输入商品总价格" type="text" class="layui-input"  disabled/>
            </div>
        </div>
    </div>
    <div class="layui-col-md6">
        <div class="layui-form-item">
            <label class="layui-form-label" style="color: #FF5722;font-weight: bolder;">订单类型</label>
            <div class="layui-input-block">
                <select id="mergeOrder" name="mergeOrder"  disabled class="layui-input"  placeholder="订单类型" >
                    <option value="1">拼单</option>
                    <option value="0">普通订单</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">支付方式<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="payType" name="payTypeName" placeholder="未支付" type="text" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">支付时间<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="payTime" name="payTime" placeholder="未支付" type="text" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">代理商<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="agentId" name="agentName" placeholder="无代理商" type="text" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">所属部门<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="deptName" name="deptName" placeholder="平台" type="text" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">新增时间<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="createTime" name="createTime" placeholder="请输入新增时间" type="text" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品优惠后总价格<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="totalGoodsPrice" name="totalGoodsPrice" placeholder="请输入商品总价格" type="number"  min="0" max="10000000" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">运费<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="shipFee" name="shipFee" placeholder="请输入运费" type="number"  min="0" max="10000000" class="layui-input"  disabled/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="color: #FF5722;font-weight: bolder;">订单状态</label>
            <div class="layui-input-block">
                <select id="orderStatus" name="orderStatus"  disabled class="layui-input"  placeholder="订单状态">
                    <option value="10">待确认</option>
                    <option value="20">待付款</option>
                    <option value="30">待发货</option>
                    <option value="40">已发货</option>
                    <option value="50">已收货</option>
                    <option value="60">已取消</option>
                    <option value="70">退款中</option>
                    <option value="80">已退款</option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item text-center " id="cacelBox" style="display: none">
        @if(shiro.hasPermission("/order/save")){
            <button class="layui-btn" lay-filter="btnSubmit" lay-submit type="button" >保存</button>
        @}
        @if(shiro.hasPermission("/order/cancel")){
            <button class="layui-btn" lay-filter="cancelSubmit" lay-submit type="button" >取消订单</button>
        @}
    </div>


   <!-- <div class="layui-form-item text-center " id="backingBox" style="display: none">
        <button class="layui-btn"  >进行退款</button>
    </div>
    <div class="layui-form-item text-center " id="backedBox" style="display: none">
        <button class="layui-btn" >已退款</button>
    </div>-->
    <div class="layui-row " id="shipBox">
        <div class=" layui-col-md12 layui-bg-gray" style="font-size: 30px;text-align: center;margin-bottom: 15px "><i class="layui-icon layui-icon-release" style="font-size: 30px"></i>物流信息</div>

        <div class="layui-form-item">
            <label class="layui-form-label">物流公司<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="shipCompany" name="shipCompany"  placeholder="请输入物流公司" type="text" class="layui-input"  />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">物流单号<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="shipNo" name="shipNo"  placeholder="请输入物流单号" type="text" class="layui-input"  />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">收货地址<span style="color: red;">*</span></label>
            <div class="layui-input-block">
                <input id="receiverAddr" name="receiverAddr"  placeholder="请输入收货地址" type="text" class="layui-input"  />
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <label class="layui-form-label">发货人</label>
                <div class="layui-input-block">
                    <input id="handlePerson" name="handlePerson"  placeholder="发货人" type="text" class="layui-input"  />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">发货时间</label>
                <div class="layui-input-block">
                    <input  name="shipTime" id="shipTime" placeholder="发货时间" type="text" class="layui-input"  disabled  />
                </div>
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <label class="layui-form-label">收货电话<span style="color: red;">*</span></label>
                <div class="layui-input-block">
                    <input id="receiverPhone" name="receiverPhone"  placeholder="请输入收货电话" type="text" class="layui-input"  />
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">收货人<span style="color: red;">*</span></label>
                <div class="layui-input-block">
                    <input id="receiverName" name="receiverName"  placeholder="待收货" type="text" class="layui-input"  />
                </div>
            </div>

        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea id="remark" name="remark"  class="layui-textarea"  ></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">物流信息</label>
            <div class="layui-input-block">
                <div class="layui-collapse"  lay-accordion>
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">最新物流</h2>
                        <div class="layui-colla-content layui-show">
                            <div class="layui-collapse" id="shipNewMsg">

                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>



        <div class="layui-form-item text-center" id="shipBtn" style="display:none">
            @if(shiro.hasPermission("/order/ship")){
                <button class="layui-btn" lay-filter="shipSubmit" lay-submit  >确认发货</button>
            @}
            @if(shiro.hasPermission("/order/saveShip")){
                <button class="layui-btn" lay-filter="btnSubmit" lay-submit type="button" >保存物流信息</button>
            @}
            <button class="layui-btn" id="queryShipButton" type="button" style="display: none;" >查询物流信息</button>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-row layui-bg-gray" style="font-size: 30px;text-align: center"><i class="layui-icon layui-icon-cart" style="font-size: 30px"></i>商品信息</div>
        <table class="layui-table" id="orderGoodsTable" lay-filter="orderGoodsTable">
        </table>
    </div>
    <div class="layui-form-item text-right">
        <button class="layui-btn" type="button" ew-event="closeDialog" >关闭</button>
    </div>
</form>
@}